package com.capa.binding

import android.view.View
import android.widget.TextView
import androidx.databinding.BindingAdapter

object ChatBindingAdapter {
    @JvmStatic
    @BindingAdapter("android:layout_gravity")
    fun setLayoutGravity(view: View, gravity: Int) {
        val params = view.layoutParams as android.widget.LinearLayout.LayoutParams
        params.gravity = gravity
        view.layoutParams = params
    }

    @JvmStatic
    @BindingAdapter("android:textColor")
    fun setTextColor(textView: TextView, color: Int) {
        textView.setTextColor(color)
    }

    @JvmStatic
    @BindingAdapter("android:background")
    fun setBackground(view: View, background: Int) {
        view.setBackgroundResource(background)
    }
} 